<?php defined('TSTP_VERSION') or die('forbidden');


/**
* MLT Web Engine
* http://www.molotsoft.ru
*
* @package MLT_WE
* @subpackage Test_Types
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: preg.tstp.php 141 2009-03-07 07:13:24Z molotsoft@gmail.com $
* @link $HeadURL: http://test-types.googlecode.com/svn/tags/2.0.1/types/regexp/preg.tstp.php $
*/


define('TSTP_PREG_ANY_PATTERN', '~^.*$~s');

function tstp_preg($var, $pattern = TSTP_PREG_ANY_PATTERN) {
	return (bool)preg_match($pattern, $var);
}

define('TSTP_REGEXP_ANY_PATTERN', TSTP_PREG_ANY_PATTERN);
define('TSTP_RE_ANY_PATTERN', TSTP_PREG_ANY_PATTERN);

function tstp_regexp($var, $pattern = TSTP_REGEXP_ANY_PATTERN) { return tstp_preg($var, $pattern); }
function tstp_re($var, $pattern = TSTP_RE_ANY_PATTERN) { return tstp_preg($var, $pattern); }


?>